require('./loader.js');
require('./mode.js');
var eR = window.loader(81354), eE = window.loader(27885),

    ts = "https://capi.coinglass.com";
var eN = function (t) {
    var e, n = eE.ZP.inflate(new Uint8Array(t.match(/[\da-f]{2}/gi).map(function (t) {
        return parseInt(t, 16)
    }))), r = "", i = 16384;
    for (e = 0; e < n.length / i; e++)
        r += String.fromCharCode.apply(null, n.slice(e * i, (e + 1) * i));
    return decodeURIComponent(escape(r += String.fromCharCode.apply(null, n.slice(e * i))))
}
    , eZ = function (t, e) {
    var n = eN(eR.AES.decrypt(t, eR.enc.Utf8.parse(e), {
        mode: eR.mode.ECB,
        padding: eR.pad.Pkcs7
    }).toString(eR.enc.Hex));
    return '"' == n.charAt(0) && (n = n.substring(1, n.length)),
    '"' == n.charAt(n.length - 1) && (n = n.substring(0, n.length - 1)),
        n
}

function decrypt_data(data,user) {
    var e = '/api/home/v2/coinMarkets'
        , n = btoa("coinglass".concat(e, "coinglass"));
    n = n.substring(0, 16),

        n = eZ(user, n);
    var r = eZ(data, n);
    return r;
}